#!/usr/bin/env python3
# coding=utf-8

import rospy
from std_msgs.msg import String

rospy.init_node("publisher_py_node")
pub = rospy.Publisher("/pysensor", String, queue_size=10)
rate = rospy.Rate(2)
cnt = 0

while not rospy.is_shutdown():
    msg = String()
    msg.data = f"Hello World! {cnt}"
    pub.publish(msg)
    cnt += 1
    rate.sleep()
